package com.botarena.shared;

import java.io.Serializable;

public class BattleInfo implements Serializable {

	private static final long serialVersionUID = -1604682175802742910L;

	private String battleKey;
	private String bot1Name;
	private String bot2Name;
	private int winner;
	private String contestName;
	private String date;

	public BattleInfo() {
		// Serializable
	}

	public BattleInfo(String battleKey, String bot1Name, String bot2Name,
			int winner, String contestName, String date) {
		this.battleKey = battleKey;
		this.bot1Name = bot1Name;
		this.bot2Name = bot2Name;
		this.winner = winner;
		this.contestName = contestName;
		this.date = date;
	}

	@Override
	public String toString() {
		return getDate() + " - duel (part of contest " + getContestName()
				+ ") between " + getBot1Name() + " and " + getBot2Name() + ": "
				+ getWinner() + " has won.";
	}

	public void setBot1Name(String bot1Name) {
		this.bot1Name = bot1Name;
	}

	public String getBot1Name() {
		return bot1Name;
	}

	public String getBot2Name() {
		return bot2Name;
	}

	public int getWinner() {
		return winner;
	}

	public String getContestName() {
		return contestName;
	}

	public String getDate() {
		return date;
	}

	public void setBattleKey(String battleKey) {
		this.battleKey = battleKey;
	}

	public String getBattleKey() {
		return battleKey;
	}
}
